<?php
class Post {
	function init() {
		if (is_admin())
			add_action('admin_menu', array(&$this, 'menu'));
	}

	function menu() {
		global $types, $options;
	
		//if (current_user_can('publish_posts')) {
			foreach($types as $type) {
				if ($type != 'text' && ($options[$type]) != '0') {
					add_submenu_page(
								'post-new.php'
								, 'Add a ' . _capitalize($type)
								, _capitalize($type)
								, 1 //10
								, $type
								, array(&$this, 'form')
					);
				}	
			}
		//}		
	}

	function form() {
		include(TEMPLATEPATH . '/app/display/post.php');
		
	}
}

$Post = new Post();
$Post->init();
?>